<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<link rel="stylesheet" href="__PUBLIC__/css/bootstrap.min.css" />
<link rel="stylesheet" href="__PUBLIC__/css/bootstrap-theme.min.css" />
<style>
    caption {
        text-align: center;
        font-size: 15px;
    }
</style>

<body>
<div class="dropdown">
    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
        提取审核
        <span class="caret"></span>
    </button>
    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
        <li><a href="#">提取审核</a></li>
        <li><a href="#">提取成功</a></li>
    </ul>
</div>
<table class="table table-bordered" summary="上医道元" border="1px">
    <caption>上医道元 下单系统</caption>
    <thead>
    <th scope="col">提取人</th>
    <th scope="col">提取金额</th>
    <th scope="col">提取时间</th>
    <th scope="col">提取状态</th>
    <th scope="col">支付宝账号</th>
    <th scope="col">支付宝姓名</th>
    <th scope="col">提取</th>
    </thead>
    <!--<tfoot>
        <td colspan="4">名字：</td>
    </tfoot>-->
    <tbody id="tb">
    <!--<tr>-->
    <!--<td>1</td>-->
    <!--<td>Jamson</td>-->
    <!--<td>123-45678</td>-->
    <!--<td>XX市XX区XX号</td>-->
    <!--<td>Jamson</td>-->
    <!--<td>123-45678</td>-->
    <!--<td>XX市XX区XX号</td>-->
    <!--<td>Jamson</td>-->
    <!--<td>123-45678</td>-->
    <!--<td>XX市XX区XX号</td>-->
    <!--<td>-->
    <!--<div class="btn-group" role="group" aria-label="...">-->
    <!--<button type="button" class="btn btn-default">结账</button>-->
    <!--<button type="button" class="btn btn-default" style="">取消</button>-->
    <!--</div>-->
    <!--</td>-->
    <!--</tr>-->
    </tbody>
</table>
<nav aria-label="Page navigation" style="text-align: center">
    <ul class="pagination" id="list">

    </ul>
</nav>

</body>

</html>
<script type="text/javascript" src="__PUBLIC__/js/jquery-2.1.0.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
<script>
    $(function () {

        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if(r != null) return unescape(r[2]);
            return null;
        }

        var page = GetQueryString("page");
        if(page == null)
            page=0;

        $.ajax({
            url:"/app/sydy/account/deposit/getdepositinfo",
            type:"GET",
            dataType:"json",
            success:function (data){
                if(data.code == 0){
                    return;
                }
                var data = data.msg;
                for(var key in data){
                    var obj = '<tr> \
                            <td>'+data[key].nickname+'</td> \
                            <td>'+data[key].money+'</td> \
                            <td>'+data[key].date+'</td> \
                            <td>'+status(data[key].status)+'</td> \
                            <td>'+data[key].bank_name+'</td> \
                            <td>'+data[key].bank_number+'</td> \
                            <td><button type="button" data-id="'+data[key].id+'" class="btn btn-default pick_money">通过</button></td> \
                            </tr> ';
                    $("#tb").append(obj);
                }
            }
        });

        function status() {
            return "未通过";
        }

        $(document).on("click",".pick_money",function () {

            var uid = $(this).data('id');
            $.ajax({
                url: "/app/sydy/account/deposit/passdeposit?id="+uid,
                type:"GET",
                dataType:"json",
                success:function (data) {

                    alert(JSON.stringify(data));
                },
                error:function (data) {
                    alert(1)
                }
            });
        });
    })
</script>